feat(git): resolve exact two-dot and three-dot ranges - #27
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
WalkthroughAdds immutable two-dot and three-dot commit-range snapshots. The implementation resolves exact commit identities, applies scoped raw diffs, and reports structured warnings for invalid references or missing merge bases. ChangesCommit-range snapshot resolution
Estimated code review effort: 4 (Complex) | ~45 minutes Merge Risk: ⚪ Minimal · up to This PR adds localized Git range resolution with passing verification and no actionable merge-blocking risk remains. Sequence Diagram(s)sequenceDiagram
participant Caller
participant resolve_commit_range
participant _resolve_commit
participant Git
participant CommitRangeResolution
Caller->>resolve_commit_range: base_ref, head_ref, three_dot, pathspecs
resolve_commit_range->>_resolve_commit: resolve base and head commits
_resolve_commit->>Git: verify refs and object IDs
Git-->>_resolve_commit: commit object IDs
resolve_commit_range->>Git: resolve merge base when three_dot is enabled
Git-->>resolve_commit_range: comparison base object ID
resolve_commit_range->>Git: execute scoped raw diff
Git-->>resolve_commit_range: raw diff records
resolve_commit_range->>CommitRangeResolution: entries, IDs, and warnings
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
Summary
Verification
python3 -m pytest -q tests/test_git_snapshot.py— 15 passedpython3 -m pytest -q— 107 passedpython3 -m compileall -q diffgraph tests mcp_server.py build.pygit diff --checkCompatibility
This adds an internal resolver without changing the current CLI, schema, or extension contract. No cross-repository compatibility or public-claim updates are required for this slice.
Remaining work
Wire commit-range resolution into the canonical artifact/CLI path and carry these immutable endpoint identities into artifact provenance. The broader edge-case matrix in #21 remains open.
Part of #21
Summary by CodeRabbit
New Features
Bug Fixes